package cn.tonyandmoney.voicenotes.notes.presenter

import android.content.Context
import cn.tonyandmoney.voicenotes.notes.entity.TNote
import cn.tonyandmoney.voicenotes.notes.presenter.impl.NotesListPresenter
import cn.tonyandmoney.voicenotes.notes.presenter.impl.SearchPresenter
import com.zlzsy.app.base.ui.interfaces.IActivity

interface INoteListPresenter {

    fun queryData(refresh: Boolean, offset: Int, keywords: String? = null)

    fun searchByType(refresh: Boolean, offset: Int, types: List<String>)

    fun loadTypes(): List<String>

    fun delete(note:TNote)


    companion object {
        fun create(mView: INoteListView, context: Context): INoteListPresenter = NotesListPresenter(mView, context)
    }

}

interface INoteListView : IActivity ,SearchPresenter.ISearchView{
    fun setData(list: List<TNote>, canLoadMore: Boolean)

    fun addData(list: List<TNote>, canLoadMore: Boolean)


}